<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<%include("/common/include.html"){}%>
		<style type="text/css">
			ul{
				height:auto;
				width:100%;
				padding:10px;
			}
			ul li{
				width:230px;
				display:inline-block;
			}
		</style>
	</head>
	<body style="overflow-x:hidden;">
	
		<form>
		<%include("/commonUtil/ddcSearchCustomer.html"){}%>
			<!-- <ul>
				<li>
					<span>：</span>
					<input style="width: 200px; height: 30px;" class="easyui-datebox theme-textbox-radius"  id="ksrq"/>
				</li>
				<li>
					<span>：</span>
					<input style="width: 200px; height: 30px;" class="easyui-datebox theme-textbox-radius"  id="jsrq" />
				</li>
				<li>
					<span>状态：</span>
					<select class="easyui-combobox theme-textbox-radius" style="width: 200px; height: 30px;" id="type" >
						<option value="">--请选择--</option>
						<option value="0">未读</option>
						<option value="1">已读</option>
					</select>
				</li>
				<li>
					<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" style="width:200px" onclick="queryCustomer()">搜索</a>
				</li>
			</ul > -->
		</form>
		<div data-options="region:'center'" style="overflow-x:hidden;">
		<table class="easyui-datagrid" id ="announceInfo" style="width:100%;height:auto;"></table>
		</div>
		
		
		
		<script>
		
		
		
		function queryCustomer(){
			$('#announceInfo').datagrid({
				cls: "theme-datagrid",
				title:"号牌分配",
				singleSelect: true,
				rownumbers: true, //显示序号
				fitColumns:true,
				pagination: true,
				pageSize: 10,
				url: "hpfp/getlist",
				queryParams: {
					'_query.HPHM': $("#HPHM").val(),
					'_query.LSH': $("#LSH").val(),
					'_query.SFZMHM': $("#SFZMHM").val(),
				},
			    method: 'post',
			    collapsible:true,
			    columns:[[
							{field:'lsh',title:'流水号',width:15,align:'center'},
							{field:'sfzmhm',title:'身份证',width:12,align:'center'},
							{field:'syr',title:'所有人',width:10, align:'center'},
							{field:'clxh',title:'车型',width:10,align:'center'},
							{field:'hphm',title:'车牌号',width:10,align:'center'},
							{field:'djrq',title:'注册时间',width:10, align:'center'},
							{field:'zdyzt',title:'状态', align:'center',
								formatter: function(value,row,index){
									if(row.zdyzt == '1'){
										return  '已注册';
									}else	if(row.zdyzt == '2'){
										return  '已分配车牌';
									}else if(row.zdyzt == '3'){
										return  '已制证';
									}else if(row.zdyzt == '4'){
											return  '已归档';
									}
								},
								styler: function (value, row, index) {
									if(row.zdyzt == '1'){
										return 'color:green';
									}else
									if(row.zdyzt == '2'){
										return 'color:#5798fc';
									}else
									
									if(row.zdyzt == '3'){
										 return 'color:red';
									}else{
										return 'color:green';
									}
								
						             
						        }
							},
							{field:'operate',title:'操作', align:'center',
								formatter: function(value,row,index){
									if(row.zdyzt == '1'){
									return '<a onclick='+'check(\'' + row.ids + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:red'+' class='+'l-btn-text'+'>分配车号</span></span></a>'
									}
								}
								}						
							]]
			})
			
		}
		
		
		$(document).ready(function () {
			
			$("#HPHM").combobox({

				onChange: function (n,o) {

					$("#LSH").textbox("clear");
					$("#SFZMHM").textbox("clear");
					 queryCustomer();
				}

				});
				$("#LSH").combobox({

					onChange: function (n,o) {

						$("#HPHM").textbox("clear");
						$("#SFZMHM").textbox("clear");
						 queryCustomer();
					}

					});
				$("#SFZMHM").combobox({

					onChange: function (n,o) {

						$("#HPHM").textbox("clear");
						$("#LSH").textbox("clear");
						 queryCustomer();
					}

					});
			
			
			
			 queryCustomer();
		});
		
		
		
		function operate(){
			return '<a href="#" style="display:inline-block;height:25px;width:80px;background:#1CCE78;line-height:25px;border-radius:3px;color:#ffffff;" onclick="check()">查&nbsp;&nbsp;看</a>';
		}
		function check(ids){
			//loadDialog($("#" + rightTable), zTree, '添加功能', url);
			loadDialog(null,null, '车号分配', '${cxt !}/hpfp/toHpfp?ids=' + ids);
			////loadDialog('车号分配', '${cxt !}/detailAnnounce/check?ids=' + ids,null);
		}
		</script>
	</body>
</html>
